package com.test.mylotterysystem.service.serviceEnum;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Getter
public enum ActivityPrizeStatusEnum {
    INIT(1, "未被抽取"),
    COMPLETE(0, "已被抽取");

    private Integer code;
    private String status;

    public static ActivityPrizeStatusEnum forName(String name) {
        for (ActivityPrizeStatusEnum value : ActivityPrizeStatusEnum.values()) {
            if (value.name().equalsIgnoreCase(name)) {
                return value;
            }
        }
        return null;
    }
}
